package com.chuangjiangx.member.coupon.ddd.domain.model;

/**
 * Created by Lenovo on 2018/8/31.
 */
public enum WxAuditStatus {
    NOT_AUDITED("未审核",0),
    SUCCESS("审核通过",1),
    FAILED("审核失败",2);

    public final String name;
    public final Integer code;

    WxAuditStatus(String name, Integer code) {
        this.name = name;
        this.code = code;
    }

    public static WxAuditStatus getWxAuditStatus(Integer code) {
        for (WxAuditStatus wxAuditStatus : values()) {
            if (wxAuditStatus.code.equals(code)) {
                return wxAuditStatus;
            }
        }
        return null;
    }
}
